package xy.web;

import java.util.HashMap;
import java.util.Map;

import xy.web.util.ServerType;

public final class SysConfig {
	protected static Map<String, String> param = new HashMap<String, String>();
	protected static String webRoot;
	protected static String webInf;
	
	protected static String uploadPath;
	protected static String downloadPath;

	public static String getUploadPath(){
		return uploadPath;
	}
	
	public static String getDownloadPath(){
		return downloadPath;
	}

	public static ServerType getServerType(){
		return ServerType.getInstance();
	}


	public static String getWebRoot(){
		return webRoot;
	}
	
	public static String getWebInf(){
		return webInf;
	}
	
	protected static String getAppParam(String name){
		if(param!=null){
			String val = (String)param.get(name);
			if(val==null){
				return "";
			}
			return val.trim();
		}
		return "";
	}
	
}
